package com.cinema.Bean;

public class Hall implements java.io.Serializable {
	private String hallId; //场厅id
	private String hallName; // 场厅名称
	public String getHallId() {
		return hallId;
	}
	public void setHallId(String hallId) {
		this.hallId = hallId;
	}
	public String getHallName() {
		return hallName;
	}
	public void setHallName(String hallName) {
		this.hallName = hallName;
	}
	
	public boolean equals(Object obj) {
		if (obj == null)// 非空性
			return false;
		if (obj == this)
			return false;// 自反性
		if (obj instanceof Hall) {
			// 向下转型
			Hall u = (Hall) obj;
			// 利用数据库的规则，主键相等，即数据相等
			return u.hallId.equals(this.hallId);
		}
		return false;
	}

	public int hashCode() {
		return this.hallId.hashCode();// 返回主键的hashCode
	}
	
	@Override
	public String toString() {
		return "Hall [hallId=" + hallId + ", hallName=" + hallName + "]";
	}
	public Hall(String hallId, String hallName) {
		super();
		this.hallId = hallId;
		this.hallName = hallName;
	}
	public Hall() {
		super();
	}
}
